package com.nervenets.shopping.enumeration;

import com.nervenets.general.enumeration.Enums;

public enum UserType implements Enums {
    manager("管理员"),
    teacher("导师"),
    user("用户"),
    ;

    private final String text;

    UserType(String text) {
        this.text = text;
    }

    @Override
    public String getText() {
        return text;
    }

    @Override
    public String getValue() {
        return this.name();
    }

    public static UserType customValueOf(String value) {
        try {
            return UserType.valueOf(value);
        } catch (Exception e) {
            return null;
        }
    }
}
